//
//  BBNavHistoryManger.m
//  BlockBrowser
//
//  Created by Mac on 2018/4/3.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "BBNavHistoryManger.h"

@implementation BBNavHistoryManger
- (instancetype)init
{
    self = [super init];
    if (self) {
        self.historyArray = [NSMutableArray new];
    }
    return self;
}
+ (BBNavHistoryManger *)manger{
    static BBNavHistoryManger* manger = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manger = [BBNavHistoryManger new];
    });
    return manger;
}
- (void)autoJudgeAddViewController:(UIViewController *)vc{
    if ([self.historyArray containsObject:vc]) {
        [self.historyArray removeObject:vc];
        [self.historyArray addObject:vc];
        return;
    }
    [self.historyArray addObject:vc];
}
@end
